﻿using Admin.CommonLib.Models.Permission;
using Swimj.CommonLib.Base;
using Swimj.Core.DependencyInjection;

namespace Admin.ApplicationLib.Services
{
    public interface IPermissionService : IScopedDependency
    {
        Task<PaginatedResult<PermissionInfoResponseDto>> QueryPermissionsByPageAsync(PermissionSearchRequestDto model);

        Task<Result<PermissionInfoResponseDto>> GetPermissionAsync(Guid id);

        Task<Result<PermissionInfoResponseDto>> CreatePermissionAsync(PermissionEditRequestDto model);

        Task<Result<PermissionInfoResponseDto>> UpdatePermissionAsync(Guid id, PermissionEditRequestDto model);

        Task<Result<PermissionInfoResponseDto>> DeletePermissionAsync(Guid id);

        Task<Result<IList<PermissionTreeResponseDto>>> QueryPermissionsByTreeAsync(int treeType);

        Task<Result<IList<PermissionInfoResponseDto>>> QueryPermissionsAsync(PermissionSearchRequestDto model);

        Task<Result<IList<PermissionTreeResponseDto>>> GetCurrentUserPermissions(int treeType);

        Task<Tuple<Stream, string>> ExportAsync();

        Task<object?> ImportAsync(int importType, MemoryStream memoryStream);
        
        Task<Tuple<Stream, string>> ExportTemplateAsync();
    }
}